home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3449 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: dove.nist.gov!libes
  2. From: libes@nist.gov (Don Libes)
  3. Newsgroups: comp.unix.shell,comp.lang.c
  4. Subject: Re: slowing it down
  5. Date: 29 Jan 1996 01:50:55 GMT
  6. Organization: National Institute of Standards and Technology
  7. Message-ID: <LIBES.96Jan28205055@muffin>
  8. References: <4ebh99$5q9@monmouth.edu> <9601270012.AA09395@dxmint.cern.ch>
  9. NNTP-Posting-Host: muffin.cme.nist.gov
  10. In-reply-to: Dan Pop's message of Sat, 27 Jan 1996 01:12:11 +0100
  11.  
  12. In article <9601270012.AA09395@dxmint.cern.ch> Dan Pop <danpop@mail.cern.ch> writes:
  13.    s0213031@moncol.monmouth.edu (RAJIV RODRIGUES) writes:
  14.  
  15.    >I ran a simple 'cat' on a DEC ALPHA (Digital Unix) to display a long (!) file.
  16.    >I'm looking for some way to slow down ( not a pager ) the listing, so that
  17.    >it scrolls at a comfortable speed. I tried a 'nice' at lowest priority with
  18.    >no discernable effect.
  19.    >
  20.    >Anyone know any other utilities I could use?
  21.  
  22.    The right tool for this job is a serial terminal.  You can control the
  23.    scrolling speed by playing with the baud rate :-)  Or by enabling smooth
  24.    scroll (if available).
  25.  
  26.    Another solution is to write your own 'cat', which waits a certain amount
  27.    of time before displaying a new line.  The usleep function (nonstandard,
  28.    but available on your platform) is all you need for the job.
  29.  
  30. Here's a little Expect script to do it:
  31.  
  32.     set send_slow {1 .1}
  33.     send -s [read [open $argv]]
  34.  
  35. The "1 .1" means "send 1 char every .1 seconds".  Modify to taste.
  36.  
  37. Don
  38.